<template>
  <div class="hello">
    <!-- <h1>{{ msg }}</h1> -->
    <h3>姓名：{{ name }}</h3>
    <h3>年龄：{{ age }}</h3>
    <button @click="changeName">点击修改姓名</button>
    <button @click="changeAge">点击修改年龄</button>
    <button @click="showTel">查看联系方式</button>
  </div>
</template>

<script>
export default {
  name: 'HelloWorld',
  // props: {
  //   msg: String
  // }
  setup() {
    let name ='张三'
    let age =18
    let tel =18689895689

   function changeName(){
        name = '小麦'
        console.log("1");
      }
      // changeAge() {},
      // showTel() {}

    return {
      name,
      age,
      tel,
      changeName
    }
  }
}
</script>

<style scoped>

</style>
